Go Back

// During The Lab stage of the development cycle for us at Deimos there will be updates on a regular basis, this will allow you to easily update by just running this script.
// A compiled version will be added to Tools, and it bails without waiting so it'll be updated too.  Add to say dartTask on a week or monthly schedule to make sure you're always up to date.
program TheLabStageUpdater;
{ Main }

// Variable Declarations Here
var
            url      :            String;
            TFname   :            String;

// This is the main body of the script
begin
     // Set the URL to the installer on the Deimos website
     url := 'http://www.deimos-design.co.uk/files/demScript_Inst.exe';
     // Use a temporary filename
     TFname := BackSlash(strGetTempPath) + 'demscript.exe'
     // If it exists still from the last run, remove it so we definately have a fresh copy.
     if fileExists(TFname) then FileDelete(TFname);
     NetHTTPGet(url, tfname);
     if fileExists(TFname) then
     begin
          // We have the installer, now we just need to invoke it.
          // But we're not waiting so the script execution finishes before the installer wants to replace any in use files from this script/Or Bound runtim.
          ShellRun(Tfname, '/silent', wt_min);
     end;
end.
{ EOF }